package org.jeecg.modules.system.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.DataTime;
import org.jeecg.modules.system.entity.ZkClassMessage;
import org.jeecg.modules.system.mapper.ZkClassMessageMapper;
import org.jeecg.modules.system.service.IZkClassMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 班次信息表
 * @Author: jeecg-boot
 * @Date:   2024-06-03
 * @Version: V1.0
 */
@Service
public class ZkClassMessageServiceImpl extends ServiceImpl<ZkClassMessageMapper, ZkClassMessage> implements IZkClassMessageService {

    @Autowired
    private ZkClassMessageMapper classMessageMapper;

    //班次信息查询（BS端接口）
    @Override
    public ZkClassMessage queryZkClassMessageBS(String productFloor,String time) {
        return this.baseMapper.queryZkClassMessageBS(productFloor,time);
    }

    //查询产品名称接口
    @Override
    public List<String> queryProductSpecsName(String productFloor) {
        return this.baseMapper.queryProductSpecsName(productFloor);
    }

    //根据产品名称查询开始时间和结束时间
    @Override
    public List<DataTime> queryDataTime(String productSpecsName,String productFloor) {
        return this.baseMapper.queryDataTime(productSpecsName,productFloor);
    }

    //分页查询
    @Override
    public IPage<ZkClassMessage> queryZkClassMessage(Page<ZkClassMessage> page, ZkClassMessage zkClassMessage) {
        return page.setRecords(this.classMessageMapper.queryZkClassMessage(page,zkClassMessage));
    }

}
